package com.ming.multifunction.model.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * AI聊天记录表
 * @TableName chatai
 */
@TableName(value ="chatai")
@Data
public class Chatai implements Serializable {
    /**
     * 
     */
    @TableId(value = "id", type = IdType.AUTO)

    private Long id;

    /**
     * 用户ID
     */
    @TableField(value = "userId")
    private Long userId;

    /**
     * 问题
     */
    @TableField(value = "question")
    private String question;

    /**
     * AI的回答
     */
    @TableField(value = "answer")
    private String answer;

    /**
     * 提问时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    @TableField(value = "createTime")
    private Date createTime;

    /**
     * 是否删除
     */
    @TableField(value = "isDelete")
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}